tree serialization and tests
more complete joint writing test