Finished solution2