improve search for word break by looking both directions