refactoring
new script version