did problems 5 and 6
did problem 7