some minor changes to the js file