create loop program