problem 7 - pretty slow