       @result[name] = new TroubleshootResult name, item
       @result[name].on "completed", =>
         waitingResponse -= 1
+        # we can also send each response to user
         unless waitingResponse
           @emit "pingCompleted"
 
 
 class TroubleshootResult extends KDObject
 
-  constructor: (name, pinger) ->
+  constructor: (name, healthChecker) ->
     @name    = name
-    @pinger  = pinger
+    @healthChecker  = healthChecker
     @status  = "failed"
     super
 
-    pinger.once "finish", =>
+    healthChecker.once "finish", =>
       @status = "ok"
       @responseTime = @getResponseTime()
       @emit "completed"
 
-    pinger.once "failed", =>
-      @status = "failed"
+    healthChecker.once "failed", =>
+      @status = "down"
       @emit "completed"
 
   getResponseTime: ->
-    @pinger.getResponseTime()
+    @healthChecker.getResponseTime()
+
 
 class ConnectionChecker extends KDObject
 

      error   : ->


class ServicePinger extends KDObject
  [NOTSTARTED, WAITING, SUCCESS, FAILED] = [1..4]

  constructor: (item, options={}) ->
    super options

    @item = item
    @identifier = options.identifier or Date.now()
    @status = NOTSTARTED


    @status = WAITING
    @startTime = Date.now()
    @setPingTimeout()
    @cb.call @item, @finish.bind(this)

  setPingTimeout: ->
    @pingTimeout = setTimeout =>
      @status = FAILED
      @emit "failed"
    , 5000

  finish: (data)->
    @status = SUCCESS
    @finishTime = Date.now()
    clearTimeout @pingTimeout
    @pingTimeout = null
    @emit "finish"

  getResponseTime: ->
    status = switch @status
