why are you performing this search when the string is empty?