added changes to invite controller
fixed merge conflicts