       return end new KodingError err  if err
       return end null, inviteInfo
 
+  paramSwapper = (param, fin) ->
+    # this is here bc of fucking cyclomatic complexity error of linter
+    # if you put a few more `if` statements above it will cry
+    # this should be better done inline - SY
+    [fin, param] = [param, fin]  unless fin
+    return [fin, param]
 
   createInviteInstance = (options, callback) ->
 

      (fin) -> JInvitation.one { email, groupName }, fin

    , (invite, fin) ->
      [fin, invite] = [invite, fin]  unless fin

      return fin null, no  unless invite
      return invite.remove fin  if forceInvite

      return fin null, yes

    , (alreadyInvited, fin) ->
      [fin, alreadyInvited] = paramSwapper alreadyInvited, fin

      return fin null, yes  if alreadyInvited
      isAlreadyMember group, email, fin

    , (alreadyMember, fin) ->
      [fin, alreadyMember] = paramSwapper alreadyMember, fin

      return fin null, no  if alreadyMember
      createInviteInstance invitationData, fin

    , (invite, fin) ->
      [fin, invite] = paramSwapper invite, fin
      inviteInfo = { email, code: invite.code }  if invite

      return fin()  if noEmail or not invite
      JInvitation.sendInvitationEmail client, invite, fin
