adding code to calculate rmse curves