add save or not the result in the xml
working on pre optim