fixing sub-string matching for names