Mary (had not / finished) her dinner when her sister came.
When she came to the garage, the mechanic (had not / repaired) her car.
Liza (had been painting) the walls all day before she finished them.
The boys (had finished) doing their homework by eight o`clock.
Peter (had been working) as a driver for thirty years when he retired.
They (had been watching) TV for a quarter of an hour when the door bell rang.
Tom (had returned) home before the storm began.