refactored script tag