update
improve loop