changed res format to json arrays instead of objects