Remove unnecessary loop