Added output function