temporary begin-loop function done.