Factor out common code to new get_card() function