           console.log "#{label} is saved"
           queue.next()
 
-    create = secure (client, formData, callback)->
-      JAccount = require '../account'
-      {delegate} = client.connection
-      unless delegate instanceof JAccount
-        return callback new KodingError 'Access denied.'
-
-      JPermissionSet = require './permissionset'
-      JMembershipPolicy = require './membershippolicy'
-      JName = require '../name'
-      group                 = new this formData
+    create = (groupData, owner, callback) ->
+      console.log {owner}
+      JPermissionSet        = require './permissionset'
+      JMembershipPolicy     = require './membershippolicy'
+      JName                 = require '../name'
+      group                 = new this groupData
       permissionSet         = new JPermissionSet
       defaultPermissionSet  = new JPermissionSet
       queue = [

             JName.release group.slug, => callback err
           else
             queue.next()
        -> group.addMember delegate, (err)->
            if err then callback err
            else
              console.log 'member is added'
              queue.next()
        -> group.addAdmin delegate, (err)->
            if err then callback err
            else
              console.log 'admin is added'
              queue.next()
        -> group.addOwner delegate, (err)->
            if err then callback err
            else
              console.log 'owner is added'

          else
            @one {_id: targetId}, callback

  @create = do ->

    save_ =(label, model, queue, callback)->
      model.save (err)->
