almost done with generating JSON objects for responses