use "find" instead of "index" which raises exeception if pattern not found