fixed a lot of crap