function _reAdjustDifficulty() internal {
        
        
        
        
        
        
        uint timeTarget = 188; 
        
        if(epochCount>28) {
            
            uint i = 0;
            uint sumD = 0;
            uint sumST = 0;  
            uint solvetime;
            
            for(i=epochCount.sub(28); i<epochCount; i++){
                sumD = sumD.add(targetForEpoch[i]);
                solvetime = timeStampForEpoch[i] - timeStampForEpoch[i-1];
                if (solvetime > timeTarget.mul(7)) {solvetime = timeTarget.mul(7); }
                
                sumST += solvetime;                                                   
                
            }
            sumST = sumST.mul(10000).div(2523).add(1260); 
            miningTarget = sumD.mul(60).div(sumST); 
        }
        
        latestDifficultyPeriodStarted = block.number;

        if(miningTarget < _MINIMUM_TARGET) 
        {
          miningTarget = _MINIMUM_TARGET;
        }

        if(miningTarget > _MAXIMUM_TARGET) 
        {
          miningTarget = _MAXIMUM_TARGET;
        }
        targetForEpoch[epochCount] = miningTarget;
    }