add prev guesses and refactor