updated according to PR comments, specifically modified max invitee flow