contract feesProtocolOwnershipProcesses is feesProtocolStorage{
    //-----------------------------------------------------
    // Ownership processes 
    //-----------------------------------------------------
    function cancelOwnership(uint _amount, uint _group, address _sender)public { // for re-allocation purpose
        require(_sender == msg.sender, "not allowed!");
        // since allocating is require sufficient balance for 
        // tokenGroupsOwnershipAlloced & OwnershipTotalAllocated
        // so no need to re-check their sufficent balance 
        require(tokenOwnersBalance[_group][_sender] >= _amount, "Insufficient balance!");
        
        tokenOwnersBalance[_group][_sender] = SafeMath.safeSub(tokenOwnersBalance[_group][_sender], _amount);
        tokenGroupsOwnershipAlloced[_group]= SafeMath.safeSub(tokenGroupsOwnershipAlloced[_group], _amount);
        OwnershipTotalAllocated= SafeMath.safeSub(OwnershipTotalAllocated, _amount);
    }
    
    function sendOwnershipInsideTheGroup(uint _amount, uint _group, address _reciver, address _sender)public {
        require(_sender == msg.sender, "not Allowed!");
        require(tokenOwnersBalance[_group][_sender] >= _amount, "Insufficient balance!");
        
        tokenOwnersBalance[_group][_reciver] = SafeMath.safeAdd(tokenOwnersBalance[_group][_reciver], _amount);
        tokenOwnersBalance[_group][_sender] = SafeMath.safeSub(tokenOwnersBalance[_group][_sender], _amount);
    }
    
    function sendOwnershipOutTheGroup(uint _amount, uint _groupSender, uint _groupReciver, address _reciver, address _sender)public {
        require(_sender == msg.sender, "not allowed!");
        
        require(tokenOwnersBalance[_groupSender][_sender] >= _amount, "Insufficient balance!");
        
        tokenOwnersBalance[_groupReciver][_reciver] = SafeMath.safeAdd(tokenOwnersBalance[_groupReciver][_reciver], _amount);
        tokenOwnersBalance[_groupSender][_sender] = SafeMath.safeSub(tokenOwnersBalance[_groupSender][_sender], _amount);
        
        tokenGroupsOwnershipAlloced[_groupReciver] = SafeMath.safeAdd(tokenGroupsOwnershipAlloced[_groupReciver], _amount);
        tokenGroupsOwnershipAlloced[_groupSender] = SafeMath.safeSub(tokenGroupsOwnershipAlloced[_groupSender], _amount);
        
        tokenGroupsOwnershipAllocation[_groupReciver] = SafeMath.safeAdd(tokenGroupsOwnershipAllocation[_groupReciver], _amount);
        tokenGroupsOwnershipAllocation[_groupSender] = SafeMath.safeSub(tokenGroupsOwnershipAllocation[_groupSender], _amount);
        
    }
    
    
    
}
function cancelOwnership(uint _amount, uint _group, address _sender)public { // for re-allocation purpose
        require(_sender == msg.sender, "not allowed!");
        // since allocating is require sufficient balance for 
        // tokenGroupsOwnershipAlloced & OwnershipTotalAllocated
        // so no need to re-check their sufficent balance 
        require(tokenOwnersBalance[_group][_sender] >= _amount, "Insufficient balance!");
        
        tokenOwnersBalance[_group][_sender] = SafeMath.safeSub(tokenOwnersBalance[_group][_sender], _amount);
        tokenGroupsOwnershipAlloced[_group]= SafeMath.safeSub(tokenGroupsOwnershipAlloced[_group], _amount);
        OwnershipTotalAllocated= SafeMath.safeSub(OwnershipTotalAllocated, _amount);
    }
//-----------------------------------------------------
// Ownership processes 
//-----------------------------------------------------