substring search method added