some refactoring in card evaluator