set loop end