Get rid of another unnecessary loop of my own design