Add in extra edges to eliminate backtracking