update looping behavior