Made the loop better.