split, merge, sort zeros and ones done