split up importer and make table functions