Adding history substring search