move query reset outside of conditional and add keyboard event for enter to act as guess button