Refactoring solution_tester method