hw 6 p1 solution