Refactored set_membership method and moved to model