finished implenting invitation part