got rid of buggy code for selecting class