serializing transaction output