added the function assign_module_membership