Add recursive function to guess_hash
Use iteration instead of recursion in guessing