working on passing all tests for indexOf method