improve the edf function, more clean
clean up the dataset