halfway finished with function splitting