Remove unnecessary loop

Remove unnecessary loop