refactorng scripts for file imports