refactor user invites friend from solution