crdt encode function have been embedded, will work on decode