It needs to implement a smart backtracking