updated funciton defs and notes