adding cleaned up functionality to data import