   loadExistingPlans: () =>
     $.getJSON '/api/v1/user/existing-plans', (data) =>
       @cardInfo(data.card_info)
-      @oldTotal(data.amount)
+      @oldTotal(data.amount / 100)
       @payer(data.payer)
+
+      # we want the first plan/org, but iteration is the only way to get that from an object
+      for k,v of data.orgs
+        @existingOrganization(k)
+        @existingPlanName v['default']
+        break
 
 
   loadTeamMembers: () =>

          @collaborators(cs)
          SammyApp.setLocation "/account/plans/users"



      read: () =>
        @selectedOrganization()

    @organizations = @komp =>
      (k for k,v of @teamMembers())

    @refineNextPath = @komp =>
      "/account/plans/card"


  selectPlan: (plan) =>
    @selectedPlan(plan)
    SammyApp.setLocation "/account/plans/organization"

  load: () =>

        b.price - a.price # most expensive first
      ap

    @selectedPlan = @komp =>
      if @chosenPlan()?
        @chosenPlan()
      else if @existingPlanName()? and @availablePlans()?
        @availablePlans()[@existingPlanName()]


    @userMatrix = @komp =>
      users = {}
      for c in @collaborators()
        users[c.login] = c.plan().id if c.plan()?
      users

    @total = @komp =>
      total = 0
      for c in @collaborators()
        total += c.plan().price if c.plan()?
      total / 100

    @paidFor = @komp =>
      @payer() and (@payer() isnt VM.current_user().login)

    @selfPayer = @komp =>
      @payer() and (@payer() is VM.current_user().login)

    @notPaid = @komp =>
      not @payer()?

    @savedCardNumber = @komp =>
      return "" unless @cardInfo()
      "************" + @cardInfo().last4




    @organizationMatrix = @komp =>
      orgs = {} # TODO: merge with existing plans
