update finding solutions algorithm, add tests