changed index to position