Added tests of backtracking implementation