adding feature detection of indexOf