Having finished my homework,I went to bed这句话怎么改成

问题描述:

Having finished my homework,I went to bed这句话怎么改成
什么after finish和when i had finish?

也就是句型转换.
原句子=
1.After finishing my homework,I went to bed.
2.When i had finished my homework,I went to bed.