deciding based on tree