updates formatting for problem 30