extract dataset and remove duplicate