suffix array works but it sorts incorrectly a little bit