a small optimization in trie:

use iterative rather than recursice "find value" step