added plot, needs lots of work because I am unfamiliar with matplotlib