revert demonstrates combinatorial behaviour using primitive backtracking