Improved tree test