Trying to refactor google search