binary trie construction and ip lookup