function giveBirth(uint256 _matronId, uint256[2] _childGenes, uint256[2] _factors)
    external
    whenNotPaused
    onlyCLevel
    returns(uint256) {
        
        Panda storage matron = pandas[_matronId];

        
        require(matron.birthTime != 0);

        
        require(_isReadyToGiveBirth(matron));

        
        uint256 sireId = matron.siringWithId;
        Panda storage sire = pandas[sireId];

        
        uint16 parentGen = matron.generation;
        if (sire.generation > matron.generation) {
            parentGen = sire.generation;
        }

        
        
        uint256[2] memory childGenes = _childGenes;

        uint256 kittenId = 0;

        
        uint256 probability = (geneScience.getPureFromGene(matron.genes) + geneScience.getPureFromGene(sire.genes)) / 2 + _factors[0];
        if (probability >= (parentGen + 1) * _factors[1]) {
            probability = probability - (parentGen + 1) * _factors[1];
        } else {
            probability = 0;
        }
        if (parentGen == 0 && gen0CreatedCount == GEN0_TOTAL_COUNT) {
            probability = 0;
        }
        if (uint256(keccak256(block.blockhash(block.number - 2), now)) % 100 < probability) {
            
            address owner = childOwner[_matronId];
            kittenId = _createPanda(_matronId, matron.siringWithId, parentGen + 1, childGenes, owner);
        } else {
            Abortion(pandaIndexToOwner[_matronId], _matronId, sireId);
        }
        
        
        
        

        
        
        delete matron.siringWithId;

        
        pregnantPandas--;

        
        msg.sender.send(autoBirthFee);

        delete childOwner[_matronId];

        
        return kittenId;
    }