     else @checkKdStatus yes
 
 
-  setMenu: (menu, show = no) ->
+  setMenu: (menu = [], show = no) ->
 
     if typeof menu is 'string'
       menu = [ label: menu, enabled: no ]
 
-    @_contextMenu = Menu.buildFromTemplate menu.concat [
+    win = @_mainWindow
+    teams = @_previousTeams
+
+    menuItems = [
       type    : 'separator'
       visible : @_isKdRunning
     ,

      click   : -> app.quit()
    ]

    @tray.popUpContextMenu @_contextMenu  if show


  setFailed: (err) ->

      else
        @_isKdRunning = yes
        @loadMachineMenu show


  loadPreviousTeams: ->

    ipcMain.once 'answer-previous-teams', (event, previousTeams) =>
      console.log {previousTeams}
      @_previousTeams = previousTeams
      @setMenu()

    console.log 'loading previous teams'
    @_mainWindow.webContents.send 'get-previous-teams'
