add graphing functionality