added JSON output option