Good use of `indexOf` here. I like this approach.