change indexOne implementation