Added output function.