clean up code for selectivity tests