some changes to SuffixArray