replaced the ismember() function with the new subset_index() function