update ismember function