Iterative backtracking