fix ugly if/else in card