clean up test selection logic