changed output format from json array to json object