made sat to use non-recursive backtracking