added refactoring version of script