almost done with the guessing function