Svp pouvez-vous m'aider et merci d'avance! ;D

Complete these sentences with the correct past tense. ( plus précisément le "Past perfect simple" ou bien le "Past perfect continuous" )

1. He ………….. (listen) to music when someone ……. (knock) at the door.
2. I ………………. (study) for 6 years before I …….. (get) my degree.
3. Catherine …………. (write) 2 books before she ……… (decide) to start writing songs.
4. I …………. (sleep) and I…………… (have) funny dreams for weeks. Then, everything
………… (change) when I ………….. (move) houses.
5. We …………. (not / watch) TV when you ……… (call) us.
6. I ………… (be) in various countries until I …….. (find) the place I wanted to live in.