problems 9 & 10 solved