function trashed(address farmer) constant public returns (uint256 balance) {
        
        balance = trashes[farmer];

        
        var elapsed = block.timestamp - recycled[farmer];
        if (elapsed >= 0) {
            var rotten = cellars[farmer];
            if (elapsed < decay) {
               rotten = cellars[farmer] * elapsed / decay;
            }
            balance += rotten;
        }
        
        var list = fields[farmer];
        for (uint i = empties[farmer]; i < list.length; i++) {
            elapsed = block.timestamp - list[i].sowed;
            if (elapsed >= growth) {
                rotten = 2 * list[i].potatoes;
                if  (elapsed - growth < decay) {
                    rotten = 2 * list[i].potatoes * (elapsed - growth) / decay;
                }
                balance += rotten;
            }
        }
        return balance;
    }