takes the index out