setting up the javascript