Add backtracking and breadth first search