Added the graphing functionality