refactoring card selection