finished problem 7
solved problem 8