added test for serializing references