add some tests for serialization