Got backtracking working