internal serializer