now serializing as byte array