added graphing functionality.