       if model
         return error "The domain #{domain} already exists", "DUPLICATEDOMAIN"
 
-      domainData = { domain, group }
-
-      resolveDomain domainData, (err)->
+      resolveDomain domain, (err)->
         return callback err  if err
 
-        createDomain {
-          account: delegate, domainData, group, stack
+          domain, group, stack
+          account: delegate
         }, callback
       , type is 'custom'
 

    return {type: 'internal', slug, prefix, domain}


  resolveDomain = (domainData, callback, check)->

    return callback null  unless check

    {domain} = domainData

    dns = require 'dns'
    dns.resolve domain, (err, remoteIps)->


    domains.forEach (domain) ->

        domain, account, group, stack
      }, (err, domain)->

        if err? then console.error err  unless err.code is 11000
