adding second parameter (sorting string) to JSON fetch functions