add smart history search