finished hw8 problem 1
finished hw8 problem 2