standard the train api
add trie structure