function BuyOnSecondaryMarket(uint32 bondId) 
        public payable
    {
        var bond = Bonds[bondId];
        
        
        require(bond.issueTime > 0);
        
        require(bond.redeemTime == 0 && block.timestamp < bond.maxRedeemTime);
        
        var price = bond.sellingPrice;
        
        require(price > 0);
        
        require(price <= msg.value);
        
        
        var residue = msg.value - price;
        
        
        var oldOwner = bond.owner;
        var newOwner = msg.sender;
        require(newOwner != 0 && newOwner != oldOwner);
        
        bond.sellingPrice = 0;
        bond.owner = newOwner;
        
        var user = Users[bond.owner];
        user.bonds[user.totalBonds] = bond.id;
        user.totalBonds += 1;
        
        
        require(add(price, residue) == msg.value);
        
        
        Sold(bond.id, oldOwner, newOwner, price);
        
        
        Balances[oldOwner] = add(Balances[oldOwner], price);
        
        if (residue > 0)
        {
            
            newOwner.transfer(residue);
        }
    }