final version of data_import.py