hw 7 solution 542