cleaning up JSON output