refactored invitation to invite