 
     JGroup = require '../group'
 
-    JGroup.one slug: 'koding', (err, koding) ->
+    JGroup.one { slug: 'koding' }, (err, koding) ->
       return callback err  if err
 
-      packOptions = targetOptions: selector: tags: 'group'
+      packOptions =
+        targetOptions :
+          selector    :
+            tags      : 'group'
 
       koding.fetchPack {}, packOptions, (err, pack) ->
         return callback err  if err
 
-        subOptions = targetOptions: selector: tags: 'custom-plan'
+        subOptions =
+          targetOptions :
+            selector    :
+              tags      : 'custom-plan'
 
         delegate.fetchSubscription {}, subOptions, (err, subscription) ->
           return callback err  if err
           return callback null, no  unless subscription
 
           subscription.checkUsage pack, (err) ->
-            callback err, !err?
+            callback err, not err?
 
   @calculateQuantities = (calcOptions, callback) ->
     calculateQuantities.call this, calcOptions, (err, quantities) =>

      dash queue, -> callback null, quantities

  @fetchProductCode = (plan, tags, callback) ->
    queryOptions = targetOptions: selector: { tags }
    plan.fetchProducts null, queryOptions, (err, products) ->
      return callback err  if err
      unless products?.length
        return callback message: "no products found"

      callback null, products[0].planCode



    { userQuantity, resourceQuantity } = options.planOptions

    if 'custom-plan' in options.plan.tags
      unless userQuantity or resourceQuantity
        return callback 'User and resource quantities not specified'

      options.feeAmount = calculateCustomPlanUnitAmount userQuantity, resourceQuantity

    subscribeToPlan.call this, client, options, callback


