add test for subdocument serialization