add the ability to change the output for JSON and XML