Add backtracking support