modified the import data function