added while loop to repeat code block until correct guess