Past Cont. vs Past Perfect
The past perfect continuous tense is used to talk about longer actions or situations which had continued up to the past moment that we are thinking about.
At that time I had been studying in London for three years.
When I found Susie, I could see that she had been crying.
Both past continuous and past perfect continuous tenses can be used to talk about actions or situations that were in progress at a certain point of time in the past. While the past continuous merely shows continuity, the past perfect continuous tense also puts an emphasis on the idea of duration. It is mainly used to indicate the duration of a past activity or state.