       error   : ->
 
 
-class ServicePinger extends KDObject
+class HealthCheck extends KDObject
   [NOTSTARTED, WAITING, SUCCESS, FAILED] = [1..4]
 
-  constructor: (item, options={}) ->
+  constructor: (options={}, @item, @cb) ->
     super options
 
-    @item = item
     @identifier = options.identifier or Date.now()
     @status = NOTSTARTED
 

        "failed"
      when SUCCESS
        @finishTime - @startTime
      when "WAITING"
        "waiting"

    return status

      @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, healthChecker) ->
    @name    = name
    @healthChecker  = healthChecker
    @status  = "failed"
    super

    healthChecker.once "finish", =>
      @status = "ok"
      @responseTime = @getResponseTime()
      @emit "completed"

    healthChecker.once "failed", =>
      @status = "down"
      @emit "completed"

  getResponseTime: ->
    @healthChecker.getResponseTime()


class ConnectionChecker extends KDObject

