Is
Susan does not live here,When I first came here three years ago, she has moved to another city.
Or
Susan does not live here,When I first came here three years ago, she had moved to another city.
is better? Also,can perfect tense use with "when"?