reentrant deserialization

you better write 2 functions instead of this