added validation to memberships