finished naive suffix array