this is just a bunch of stuff. ive pretty much rewritten everything here