added notes from Frank to code