I have to rewrite the following sentence by changing the participle into a finite verb
Going up the stairs, the boy fell down.
According to me the answer should be
While the boy was going up the stairs, he fell down.
But the answer is
When he was going up the stairs, the boy fell down.
Are both the sentences same?