creates feature spec for inviting a user
refactors code according to solutions