small change to javascript