added lots of good preprocessing to the app