port OptimFROG - all tests pass