added pyplot for visualization