Теорія:

Study some signal words for Past Perfect.
  
Words for Past Perfect:
  
before — перед тим, як;
 
after — після;
 
already — вже;
 
just — тільки-но;
 
for — протягом;
 
since — с тих пір;
 
till/until — до тих пір;
 
by the time — до того часу;
 
never — ніколи;
 
earlier — раніше;
 
when — коли;
 
yet — ще ні.
 
Examples
 
She knew how to cook a cake because she had made it earlier
  
cake.jpg

James easily won this game because he had played it many times before
  
game.jpeg

John had sat to work when his boss called for him. 

We had already bought a cake when Jill called us and told that she bought a cake too. 
  
I hadn’t served the table yet when the guests came.
Джерела:
www.chess.com/article/view/how-to-win-a-chess-game
http://bekicookscakesblog.blogspot.com/2014/01/cake-decorating-and-baking-classes.html