Added code for suffix arrays