The Past Perfect

                                       PAST PERFECT SIMPLE                                                 FORM
When there is a relationship in time between two past events or situations, we use the past perfect simple for the first event or situation. It is often used in time clauses with after to indicate the earlier event. The later event in the main clause is expressed in the past simple.
First event
Past perfect simple
     
                                  PAST PERFECT PROGRESSIVE                                              FORM
The past perfect progressive is used instead of the past perfect simple to emphasize that an activity was in progress during a certain period of time before another past time. The focus is on the activity itself not on the completion - the same as in the present perfect progressive!
Activity
Past perfect progressive
Past perfect simple and progressive
A JOKE