Implementing invitation function