final changes to javascript