added ability to output results as a json file