First: People ordered the book online.
Second: The book became available in stores.
When the book became available in stores, people had already ordered it online.
People had already ordered the book online when it became available in stores.
First: The children didn't eat breakfast.
Second: The children went to school.
When the children went to school, they hadn't eaten breakfast.
The children hadn't eaten breakfast when they went to school.
First: I called Dr. Jones by her first name.
Second: Someone said she was a professor.
By the time someone said Dr. Jones was a professor, I had already called her by her first name.
I had already called Dr. Jones by her first name by the time someone said she was a professor.
First: The TV program was popular for five years.
Second: The TV program was cancelled.
When the TV program was cancelled, it had been popular for five years.
The TV program had been popular for five years when it was cancelled.
First: It snowed five centimeters.
Second: Winter officially started.
By the time winter officially started, it had snowed five centimeters.
It had snowed five centimeters by the time winter officially started.
First: It got dark.
Second: The family ate dinner.
By the time the family ate dinner, it had got dark.
It had got dark by the time the family ate dinner.
First: We paid for the hotel.
Second: We arrived at the hotel.
When we arrived at the hotel, we had already paid for it.
We had already paid for the hotel when we arrived there.
First: They were married for less than two years.
Second: Their first child was born.
When their first child was born, they had been married for less than two years.
They had been married for less than two years when their first child was born.
First: Paul studied for four hours.
Second: Paul decided to take a break.
By the time Paul decided to take a break, he had been studying for four hours.
Paul had been studying for four hours by the time he decided to take a break.
First: Jenny took driving lessons for two months.
Second: Jenny finally learned how to drive.
By the time Jenny finally learn how to drive, she had been taking driving lessons for two months.
Jenny had been taking driving lessons for two months by the time she finally learned how to drive.
First: I lived in the apartment for only a year.
Second: I moved again.
When I moved again, I had been living in the apartment for only a year.
I had been living in the apartment for only a year when I moved again.
First: I learned Italian for two years.
Second: I moved to Rome.
I had been learning Italian for two years when I moved to Rome.
When I moved to Rome, I had been learning Italian for two years.
First: I lived in São Paulo for five years.
Second: I was offered a job In Salvador.
When I was offered a job in Salvador, I had been living in São Paulo for five years.
I had been living in São Paulo for five years when I was offered a job in Salvador.
First: He learned to cook.
Second: He moved into his own apartment.
When he moved into his own apartment, he had already learned to cook.
He had already learned to cook when he moved into his own apartment.
First: She worked as a teacher for ten years.
Second: She became the head teacher.
She had been working as a teacher for ten years when she became the head teacher.
When she became the head teacher, she had been working as a teacher for ten years.