Updated objective function