minor bug fix and start of graphing function