add serialization test for pairs