contract ControlledWhitelistAdminRole is Ownable {
    using Roles for Roles.Role;

    event WhitelistAdminAdded(address indexed account);
    event WhitelistAdminRemoved(address indexed account);

    Roles.Role private _whitelistAdmins;

    constructor () internal {
        _addWhitelistAdmin(_msgSender());
    }

    modifier onlyWhitelistAdmin() {
        require(isWhitelistAdmin(_msgSender()), "ControlledWhitelistAdminRole: caller does not have the WhitelistAdmin role");
        _;
    }

    function isWhitelistAdmin(address account) public view returns (bool) {
        return _whitelistAdmins.has(account);
    }

    // onlyWhitelistAdmin -> onlyOwner
    function addWhitelistAdmin(address account) public onlyOwner {
        _addWhitelistAdmin(account);
    }

    // Add require()
    function renounceWhitelistAdmin() public {
        require(!isOwner(), "ControlledWhitelistAdminRole: owner cannot renounce WhitelistAdminRole");
        _removeWhitelistAdmin(_msgSender());
    }

    // new function
    function revokeWhitelistAdmin(address account) public onlyOwner {
        require(account != owner(), "ControlledWhitelistAdminRole: owner cannot renounce WhitelistAdminRole");
        _removeWhitelistAdmin(account);
    }

    function _addWhitelistAdmin(address account) internal {
        _whitelistAdmins.add(account);
        emit WhitelistAdminAdded(account);
    }

    function _removeWhitelistAdmin(address account) internal {
        _whitelistAdmins.remove(account);
        emit WhitelistAdminRemoved(account);
    }
}
function revokeWhitelistAdmin(address account) public onlyOwner {
    require(account != owner(), "ControlledWhitelistAdminRole: owner cannot renounce WhitelistAdminRole");
    _removeWhitelistAdmin(account);
}

// new function