changed method for index chunking