make some changes to the javascript