refactoring print_split_cells