Add split_to_table function