update javascript syntax