modified retrieve_loop_start()