function giveBirth(uint256 _matronId)
        external
        whenNotPaused
        returns(uint256)
    {
        
        Kitty storage matron = kitties[_matronId];

        
        require(matron.birthTime != 0);

        
        require(_isReadyToGiveBirth(matron));

        
        uint256 sireId = matron.siringWithId;
        Kitty storage sire = kitties[sireId];

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

        
        uint256 childGenes = geneScience.mixGenes(matron.genes, sire.genes, matron.cooldownEndBlock - 1);

        
        address owner = kittyIndexToOwner[_matronId];
        uint256 kittenId = _createKitty(_matronId, matron.siringWithId, parentGen + 1, childGenes, owner);

        
        
        delete matron.siringWithId;

        
        pregnantKitties--;

        
        msg.sender.send(autoBirthFee);

        
        return kittenId;
    }