Woops, corrected placement of the output function