completed the solution