       if delegate.getId().equals accountId
         return callback new KodingError 'You cannot transfer ownership to yourself, concentrate and try again!'
 
-      # double check that client is really the owner
-      @fetchMyRoles client, (err, roles)=>
+      Relationship.one {
+        targetId: delegate.getId(),
+        sourceId: @getId(),
+        as      : 'owner'
+      }, (err, owner)=>
         return callback err if err
-
-        if not 'owner' in roles
-          return callback new KodingError 'You must be owner to perform this action!'
+        return callback new KodingError 'You must be the owner to perform this action!' if not owner
 
         JAccount.one _id:accountId, (err, account)=>
           return callback err if err

              callback err

            # give rights to new owner
            queue = _.difference(['member', 'admin', 'owner'], newOwnersRoles).map (role)=>=>
              @addMember account, role, (err)->
                return kallback err if err
                queue.fin()

            dash queue, =>
              # remove ownership of previous owner
              @removeOwner delegate, kallback

{Module} = require 'jraphical'
{difference} = require 'underscore'

module.exports = class JGroup extends Module

