add to_json to output