 # for the given query and language
 searchGoogle = (query, language) ->
   return new Promise (resolve, reject) ->
-    google = require "google"
     google.resultsPerPage = 10
 
     searchString = "#{query} in #{language} site:stackoverflow.com"

          atom.notifications.addSuccess "Got snippet!"
          editor.insertText(snippet)
        , (err) ->
          atom.notifications.addError "FindSnippet error: " + JSON.stringify(err)
      , (err) ->
        atom.notifications.addError "SearchGoogle error: " + JSON.stringify(err)

# a StackOverflow page
scrapeStackOverflow = (soLink) ->
  return new Promise (resolve, reject) ->
    request soLink, (error, response, body) ->
      if !error && response.statusCode == 200
        $ = cheerio.load body
        snippet = $('div.accepted-answer pre code').text()
        if snippet == ""
