Added graphing function