Function findInTree