changed output to json object