He walked for miles when he suddenly encountered a bear.
### Instruction:
Edit this sentence so that it contains only one verb tense.
He had been walking for miles when he suddenly encountered a bear.

### Response:
