Changed code to output json data in a parsable way