hw 6 p3 solution