You often use it with the past perfect progressive. If telling a story (about the past) and you what to mention something that you had been doing upto the point of the story and the story interupts it. For example, when I was a child I was asked to play in a school concert.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.