updated javascript