[to merge with master] customize serialize/deserialize