program now ends when each letter has been guessed correctly