Reimplement the intersection of dataset.