[Suffix tree] started functional suffix tree part