had + V3
Use of Past Perfect
- action that had occurred before a certain time in the past / that had already been completed when the other actions occurred.
(putting emphasis only on the fact, not the duration)
When (until) I came in they had already finished their work.
- already, yet, just, never, once, until that day, by the time, until then, for, since, recently, lately(in reported speech).
Compared with Past Simple
When there is a succession of past actions which are all relatively short- they will all be described in past simple (like a list of actions).
He walked into the room and noticed that it was unusually dark. He turned around quickly but it was too late.
When time expression when is used to mean almost simultaneously/ immediately after.
When James saw the accident, he fainted.
When the chronology is obvious, e.g. by an indication of time or by before/ after, Past Perfect is usually not used.
Compared with Past Perfect Progressive
- puts emphasis on the course or duration of an action (used with signal words like “the whole day, all day, for, since”)
When I came home I realized that they had been waiting for hours.