redid some things, should be better now