changes to javascript