added transformations and JSON output