indexOf function and test working