formatted the result as wanted in the solution