add func to remove role only if needed
Merge pull request #301 from AlexKlim/master

Remove role only if needed