notes changed to reflect current state of code.