changed Result to OptimizeResult