added matplotlib for plotting