Problem 24
Problem 25
Return index rather than value