this has all sorts of stuff i probably screwed up