Added graphing functionality