The unified objective function