change js to use a script file