Past perfect tense
had + past participle
• for actions that began or occurred before another time in the past
She had just crossed the street when the runaway car crashed into the building.