added isValidRole method