made some clarifying notes to code