1. Tom was angry because he *had missed* his train home.
2. Katie *had only been working* in her new job for a month when she got a promotion.
3. By the time we got home, everyone *had eaten* dinner.
4. Sarah was angry because she *had been waiting* for the bus for over an hour before it arrived.
5. Harry *had been digging* in the garden so he was covered in mud.
6. Alice *had not finished* her homework by bedtime.
7. They *had been cooking* for over three hours before the guests arrived.
8. I *had just decided* to walk home when the bus came along.