optimized indexSelect
merge conflicts