eesh more work on adding option to cap the number of features -- still needs a sanity check