provide return values for add/replace card, and renamed update_card to replace_card