serializing output