completed repeat_loop()