	targeted_decisions = {
	adopt_them = {
		filter = all
		
		potential = {
			NOT = { is_child_of = FROM }
			NOT = { is_older_than = FROM }
			ROOT = { age_diff = {who = FROM years = 5} }
			ai = yes
		}
		allow = {
		    always = yes
		}
		effect = {
			if = {
				limit = {
					FROM = {
						NOT = {
							is_female = yes
						}
					}
				}
				hidden_tooltip = {
					father = { ROOT = { set_real_father = PREV } }
					set_mother = 0
				}
				set_father = FROM
				dynasty = FROM
				hidden_tooltip = {
					any_child = {
						limit = { is_child_of = THIS }
						dynasty = ROOT

						any_child = {
							limit = { is_child_of = THIS }
							dynasty = ROOT

							any_child = {
								limit = { is_child_of = THIS }
								dynasty = ROOT
							}
					    } 
				    }
				}
			}
			if = {
				limit = {
					FROM = {
						is_female = yes
					}
				}
				set_mother = FROM
				dynasty = FROM
				hidden_tooltip = {
					any_child = {
						limit = { is_child_of = THIS }
						dynasty = ROOT

						any_child = {
							limit = { is_child_of = THIS }
							dynasty = ROOT

							any_child = {
								limit = { is_child_of = THIS }
								dynasty = ROOT
							}
					    } 
				    }
				}
			}
		}
		ai_will_do = {
			factor = 0
		}
	}
	disinheirit_them = {
	potential = {
			is_child_of = FROM
			ai = yes
		}
	allow = {
			always = yes
			}
	effect = {
			ROOT = {add_trait = disinherited}
	}				
	ai_will_do = {
			factor = 0
		}
		}
}