 				err = new Errors.NotFoundError("no project found for invite")
 				logger.log {err, projectId, inviteId}, "no project found"
 				return callback(err)
-			# TODO: check if we need to cast the ids to ObjectId
+			# fetch the invite
 			ProjectInvite.findOne {_id: inviteId, projectId: projectId, token: tokenString}, (err, invite) ->
 				if err?
 					logger.err {err, projectId, inviteId}, "error finding invite"

					logger.log {err, projectId, inviteId, tokenString}, "no matching invite found"
					return callback(err)

				# do the thing
				existing_users = (project.collaberator_refs or [])
				existing_users = existing_users.concat(project.readOnly_refs or [])
				existing_users = existing_users.map (u) -> u.toString()
				if existing_users.indexOf(user._id.toString()) > -1
					return callback null # User already in Project

				privilegeLevel = invite.privileges

				if privilegeLevel == PrivilegeLevels.READ_AND_WRITE
					level = {"collaberator_refs": user._id}
					logger.log {privileges: privilegeLevel, user_id: user._id, projectId}, "adding user"
				else if privilegeLevel == PrivilegeLevels.READ_ONLY
					level = {"readOnly_refs": user._id}
					logger.log {privileges: privilegeLevel, user_id: user._id, projectId}, "adding user"
				else
					return callback(new Error("unknown privilegeLevel: #{privilegeLevel}"))

				ContactManager.addContact invite.sendingUserId, user._id

				Project.update { _id: project._id }, { $addToSet: level }, (error) ->
					return callback(error) if error?
					# Flush to TPDS in background to add files to collaborator's Dropbox

			callback(null, invite)

	acceptInvite: (projectId, inviteId, tokenString, user, callback=(err)->) ->
		# fetch the target project
		Project.findOne {_id: projectId}, (err, project) ->
			if err?
				logger.err {err, projectId}, "error finding project"
