     .query(options)[action]() (err, res, body) ->
       callback(err,res,body)
 
+recordUserQueryResults = (message, results) ->
+  uQ = message.robot.brain.get('userQueries') || {}
+  uD = uQ[message.message.user.id] = uQ[message.message.user.id] || {}
+  uD.queries = uD.queries || []
+  uD.queries.push(
+    text: message.message.text
+    time: now()
+    results: results
+  )
+  message.robot.brain.set('userQueries', uQ)
+
+getLastResultsRelevantToUser = (robot, user) ->
+  uQ = robot.brain.get('userQueries') || {}
+  uD = uQ[user.id] = uQ[user.id] || {}
+  uD.queries = uD.queries || []
+  lastUQTime = 0
+  if (uD.queries.length)
+    lastUQTime = uD.queries[uD.queries.length - 1].time
+  lqT = robot.brain.get('lastQueryTime')
+  if (lqT && lqT > lastUQTime && lqT - lastUQTime > 60)
+    return robot.brain.get('lastQueryResults')
+  if (uD.queries.length)
+    return uD.queries[uD.queries.length - 1].results
+  return null
+
 explain = (data) ->
   if not data.artists
     return 'nothin\''

    'Length: ' + calcLength(data.length)
    ].join("\n")

render = (explanations) ->
  str = "I found:\n"
  for exp, i in explanations
    str += '#' + (i + 1) + "\n" + exp + "\n"
  return str

setResults = (robot, results) ->
  robot.brain.set('lastQueryResults', results)

showResults = (robot, message) ->
  data = robot.brain.get 'lastQueryResults'
  explanations = (explain track for track in data)
  return message.send(render(explanations))

calcLength = (seconds) ->

        data = JSON.parse(body)
        if (data.length > limit)
          data = data.slice(0, limit)
        robot.brain.set('lastQueryResults', data)
        robot.brain.set('lastQueryTime', now())
        recordUserQueryResults(message, data)
        showResults(robot, message, data)
      catch error
        message.send(":small_blue_diamond: :flushed: " + error.message)

