improve hand type analyse algorithm