refactoring of searching. classes know their own highlighting fields