       user.verifyByPin options, callback
 
 
-  @addToGroupByInvitation = (options, queue, callback) ->
-
-    { groupName, groupIsBeingCreated, account, user, invitation } = options
-
-    return queue.next()  if groupIsBeingCreated
+  @addToGroupByInvitation = (options, callback) ->
+
+    { groupName, account, user, invitation } = options
+
     # check for membership
     JGroup.one { slug: groupName }, (err, group) ->
 

          queue.next()

      =>
        @addToGroupByInvitation {
          groupName, groupIsBeingCreated, account, user, invitation
        }, queue, callback

      ->
        return queue.next()  if groupIsBeingCreated

      return callback new KodingError 'group doesnt exist'  if not group

      group.isMember account, (err, isMember) ->
        return callback err   if err
        return callback null  if isMember # if user is already member, we can continue

        # addGroup will check all prerequistes about joining to a group
        JUser.addToGroup account, groupName, user.email, invitation, (err) ->
          return callback err  if err
          return callback null


  redeemInvitation = (options, callback) ->
