got rid of a bunch of unnecessary code