tree structure lookup: O(n) -> O(log n)