updated print formatting for problem 15