code for selecting pertinent features