calculate hand value