simplified objective function wrapper code