Adding loops to the timeline