Refactored script step to add more features