first pass at removing the C hattrie dependency
use the trie directly