branch backtracking and revert