Rewrite the following sentence so that it is grammatically correct: 
"Peter and I went shopping yesterday, but I wasn't sure if he is was enjoying himself"
"Peter and I went shopping yesterday, but I wasn't sure if he was enjoying himself."
Complete the following task based on the instruction and optional input provided.### Instruction:
Rewrite the following sentence so that it is grammatically correct: 
"Peter and I went shopping yesterday, but I wasn't sure if he is was enjoying himself"

### Output:
"Peter and I went shopping yesterday, but I wasn't sure if he was enjoying himself."