Problem 4 - slightly slow