completed hw3 problem b2