[to merge with master] customize serialize/deserialize

Don't need this b/c of the `on.exit`