change dispaly_by_columns to print rows as rows, etc.
improved display_by_columns