added a script version of data import.