added weighted_average, weighted_average_error