save modified inputs in forward and backward executions