refactor CompositePickler serialization logic