refactor print_split_cells