added more graphing code