Adverb is a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc.
When you need to talk about two things that happened in the past and one event started and finished before the other one started, place “had” before the main verb for the event that happened first