Useful scheme to understand the difference between past perfect and present perfect:
- Past perfect
- Present perfect
perfect = before
had been – before a past moment
has/have been – before the present moment
She had been waiting for me a long time before I arrived.