Wrote output code