Removes unnecessary loop