search working buggy - only taking one character