fixed order traversal for serialization