added updated javascript