added indexOf polyfill