added some comments, need to figure out what I was thinking for some of this...but the code works