split the extrafork code out into its own function.