tree maker based on track validation code