refactoring user and card affiliations