The past perfect simple and continuous

I. Past perfect simple:

1) Form:

Jane had done her home work
Jane had not done her home work
Had Jane done her home work?
S + had + PP
S + had + not + pp
Had + S + pp?

2) Use:

Past perfect simple (first event)
Simple past (second event)
I had just completed the exam
I fel t free
The thief had escaped
Before I called the police
You had studied English
Before you moved to Britain
He had already left
When I got to his house
We had calmed down
By the time the police came
He had been upstairs
When we came home
We hadn’t noticed
Until we heard the foot steps
After I had called the police
We realized the thief was gone

The past perfect simple expresses the relationship in time between twopast events. It shows that one action occurred before another action in thepast. The past perfect simple expresses the first action and the past simpleexpresses the second action

+++ The past perfectsimple is used with some adverbials and prepositions:
before, by the time, when,until, after, already, yet, still, for, just, never………….

II. The past perfect continuous:
1. Form:

He had been working
He had not been working
Had he been working?
S + had + been + v + ing
S + had + not + been + v + ing
Had + S + been + v +ing

2. Use:

a) When the action began before the time of speaking in the past, andcontinued up to that time or stopped before it.
e.g: when I got to themeeting, the lecture had already been speaking for an hour
b) The past perfect continuous is used to refer to an action in the pastwhich continued until another action took place.
e.g: The miners had been digging all night long when an explosion occurred.
c) The past perfect continuous is used to indicate that something occurredfor long time before another event in the past.
e.g: - Ahmed had beenworking in cheese factory for ten years before he retired
- Bob had been teaching in that school for more than twenty years before he became a headmaster.
d) The past perfect continuous is used to explain why an activity orfeeling occurred in the past.
e.g: - It was now sixo’clock pm and he was very tired because he had been working since 8:00 am
  - My heart was beating too fast because I had been running for miles