Rewrite the following sentences and the meaning stays the same.
When I arrived in China. I wrote a letter home.
A.On arriving in China, I had written a letter home
B.On arriving in China, I was writing a letter home
C.On arriving in China, I wrote a letter home
D.On arriving in China, I write a letter home