function bringKydyHome(uint256 _yinId)
        external
        whenNotPaused
        returns(uint256)
    {
        
        Kydy storage yin = kydys[_yinId];

        
        require(yin.createdTime != 0);

        
        require(_isReadyToBringKydyHome(yin));

        
        uint256 yangId = yin.synthesizingWithId;
        Kydy storage yang = kydys[yangId];

        
        uint16 parentGen = yin.generation;
        if (yang.generation > yin.generation) {
            parentGen = yang.generation;
        }

        
        uint256 childGenes = geneSynthesis.synthGenes(yin.genes, yang.genes);

        
        address owner = kydyIndexToOwner[_yinId];
        uint256 kydyId = _createKydy(_yinId, yin.synthesizingWithId, parentGen + 1, childGenes, owner);

        
        delete yin.synthesizingWithId;

        
        creatingKydys--;

        
        msg.sender.transfer(autoCreationFee);

        
        return kydyId;
    }