Can we just move this up into the while loop inside the if statement?