Reorganized the solution