added more graphing code (incomplete)