add basic binary tree serialization and deserialization