added chekc for sort-index