connecting the javascript