       workspaceSlug = latestWorkspace.workspaceSlug
 
   kd.getSingleton('router').handleRoute "/IDE/#{machine.slug}/#{workspaceSlug}"
-
-  # if latestWorkspace = getLatestWorkspace()
-  #   {machineLabel} = latestWorkspace
-  #   if machineLabel is machine.label
-  #     workspaceSlug = latestWorkspace.workspaceSlug
-
-  # workspaceSlug ?= 'my-workspace'
-
-  # kd.getSingleton('router').handleRoute "/IDE/#{machine.slug}/#{workspaceSlug}"
 
 
 routeToLatestWorkspace = ->

    router.handleRoute "/IDE/koding-vm-0/my-workspace"


  # router = kd.getSingleton 'router'

  # for machine in globals.userMachines when machine.isMine()
  #   return routeToMachineWorkspace machine

  # kd.singletons.computeController.fetchMachines (err, machines) ->

  #   if err or not machines.length
  #   then router.handleRoute "/IDE/koding-vm-0/my-workspace"
  #   else routeToMachineWorkspace machines.first


routeToMachineWorkspace = (machine) ->

  latestWorkspace = getLatestWorkspace()

          routeToMachineWorkspace machine
        else
          routeToLatestWorkspace()
