clean up code of data import