adding a bunch more code, now adding comments to figure out what i'm doing