code refactoring and updated script importing