pretty simple tree search