refactored compare card values