correct answer, but slow