almost implement serializer