updated javascript format and updated query path