updated the hand sorting algos