Grammar summary
To talk about an event or situation in the past which happened before the other past.
Use:
now
past
Past perfect
form
had + done
had + been done