finished import function