Update Problem 6.R