Add loop to program