finished exercise 4-2, working with setw