do the loop better.