added plt.close() statement