added plot_rate