touches set.csv, begins sortByType function
adds switch statement for sortbytype() function
refactors sortByType function