writing import function