Added code to output results to standard output