Rather than checking this through the whole loop, just move it after