moved all js in a js file