added the while loop

added the while loop to keep checking to see if the variables are empty
strings