Fully working correctly with list instead of tree searching.