Adds collision resolution with backtracking