return index of matching itmes