Naive implementation