refactored check_deck method