Updated addMembership and SEGMENT_MEMBERSHIP constant