refactoring; only need to insert <script> in web page