some minor changes to js file