Put in the Past Perfect Continuous

1. He (sit) here for 40 minutes when the telephone rang.
2. I (try) to get him on the phone all day.
3. At eight in the morning we (drive) for six hours.
4. Tom (do) his homework for an hour when his friend came to see him.
5. He (wait) for her for a long time before she came.
6. We (walk) in the rain for many hours when we saw a house.
7. She (sit) there for half an hour before it started raining.
8. He (look) for his glasses for an hour before he realized he had them in his pocket.
9. We (sleep) for 12 hours when he woke us up.
10. I (not/walk) for a long time, when it suddenly began to rain.
11. How long (learn/she) English before she went to London?
12. He (drive) less than an hour when he ran out of petrol.
13. They were very tired in the evening because they (help) on the farm all day.
14. They (cycle) all day so their legs were sore in the evening.