finished solution 9