wrote a bunch of comments explaining what I'm doing