use another file to write the js code