Improve the loop