moved the js in a file