change output to a JSON instead of a plain text