function mine(uint256 nonce) whenNotPaused returns (bool success) {
        require(checkMine(nonce));

        Mine(msg.sender, blockReward, uint40(block.timestamp) - uint40(lastMinedOn)); 

        balances[msg.sender] += blockReward; 
        blockNumber += 1;
        totalSupply += blockReward; 
        updateRandomness();

        
        var mul = (block.timestamp - lastMinedOn);
        if (mul > (60*2.5*2)) {
            mul = 60*2.5*2;
        }
        if (mul < (60*2.5/2)) {
            mul = 60*2.5/2;
        }
        target *= mul;
        target /= (60*2.5);

        if (target > powLimit) { 
            target = powLimit;
        }

        lastMinedOn = uint40(block.timestamp); 
        if (blockNumber % halvingInterval == 0) { 
            blockReward /= 2;
            RewardHalved();
        }

        return true;
    }