a bunch of tweaks to get it to run on real sample data set