YOU SAID:
I had a hat when I came in
INTO JAPANESE
私が入ったとき私は帽子をかぶっていた
BACK INTO ENGLISH
I was wearing a hat when I entered
INTO JAPANESE
入ったとき帽子をかぶっていた
BACK INTO ENGLISH
I was wearing a hat when I entered
Yes! You've got it man! You've got it