       if subscribeToChannelNames.length is 0
         clearInterval subscribeCheck
         startQueueChecker()
-        cb()
+        callback()
     , 10
     @connected = true
 


    # sendCommand broadcasts, with this one, we first push to queue
    # then broadcast and one of them consumes
    @callbackid++
    data = {
      cmd: cmd,
      id: @callbackid,
      args: args,
      from: @getChannelNameForKite()
    }

    if cb
      @waitingReplies[@callbackid] = cb

    datastr = JSON.stringify(data)
    @mergenData.rpush channel, datastr, ()=>


  sendCommand: (channel, cmd, args, callback=null)->
    # this broadcasts command to the said channel
    @callbackId++
    data = {
      cmd: cmd,
      id: @callbackId,
      args: args,
      from: @getChannelNameForKite()
    }

    if callback
      @waitingReplies[@callbackId] = callback
    @mergenData.publish channel, JSON.stringify(data)

  connectToMessageBus: (callback)=>

    # we have a second connection because, redis client in node doesnt send any commands
    # when it enters subscribe mode, though redis docs says you can publish if you are in subcribe
