corrected the solution