Replaced average with mean_curve