my suffixtrie implementation