added Adrian's hand_evaluator
fixed the while loop