fixed m file, added notes