the solve method was divided in two parts - backtracking algorithm and
simple solving.