Naive implementation.