redid entire graphing mechanism