Add indexOf as seperate method.