single output function

consolidated printing to a single output function.