adding plotting with matplotlib