refactored cards to its own object