hw3 problem 8