Set up a if statment for the while loop