fixed up a bunch of stuff