contract TerraVirtua is ERC20Detailed, ERC20, Ownable {

    bool public isTransferFrozen = true;

    mapping(address => bool) public distributors;

    event DistributionPermissions(address account, bool _value);
    event TransfersUnfrozen(address account);

    constructor(address _tokenHolder, uint256 _totalSupply)
        public
        ERC20Detailed("Terra Virtua", "TVA", 18)
    {
        _mint(_tokenHolder, _totalSupply);
        distributors[msg.sender] = true;
        distributors[_tokenHolder] = true;
    }

    /**
     * @dev set or unset distributor address
     * @param _address The address of distributor.
     * @param _value The bool value to set or unset permissions.
     */
    function setDistributionPermissions(
        address _address,
        bool _value
    )
        public
        onlyOwner
    {
        distributors[_address] = _value;
        emit DistributionPermissions(_address, _value);
    }

    /**
    * @dev allow to transfer tokens by everyone to everyone
    */
    function unfreezingTransfers() public onlyOwner {
        isTransferFrozen = false;
        emit TransfersUnfrozen(msg.sender);
    }

    function _transfer(address from, address to, uint256 value) internal {
        if (true == isTransferFrozen) {
            require(
                distributors[from] == true || distributors[to] == true,
                "Action is not available"
            );
        }
        return super._transfer(from, to, value);
    }

}
function setDistributionPermissions(
    address _address,
    bool _value
)
    public
    onlyOwner
{
    distributors[_address] = _value;
    emit DistributionPermissions(_address, _value);
}

/**
 * @dev set or unset distributor address
 * @param _address The address of distributor.
 * @param _value The bool value to set or unset permissions.
 */