* move init script handling into its own function