key: added leftoverf fn and removed consume.
trie: implemented lb and ub fn.