function claimEnergy() isActive external {
        Energy storage energy = energyData[msg.sender];
        uint period = safeDeduct(block.timestamp, energy.lastClaim);
        uint energyAmount = (period / claimTime) * claimAmount;
        
        if (energyAmount == 0) revert();
        if (energyAmount > claimMaxAmount) energyAmount = claimMaxAmount;
        
        energy.freeAmount += energyAmount;
        energy.lastClaim = block.timestamp;
        
        EventEnergyUpdate(msg.sender, energy.freeAmount, energy.paidAmount, energy.lastClaim);
    }