Changes cost_derivative to cost