factored out verification in solveCases