including last element in selectivity test