suffix array rewrite, some bwt aligning