improved card and deck model