minor modifications for outputting results.