YOU SAID:
i had been eating when she walked in
INTO JAPANESE
彼女が入ったとき、私は食べていました
BACK INTO ENGLISH
I was eating when she entered
INTO JAPANESE
彼女が入ったとき、私は食べていました
BACK INTO ENGLISH
I was eating when she entered
Come on, you can do better than that.