fix objective function