refactor solve_for_one working