HW8 up to problem 2