Added ability to change the starting index for indexOf search.