ex3, printing and formatting