structure of solution for hw5 q1