Updated code for ZillowTrinary tree