implement serializer for sequence