extract Algo_TB_Split into its own file