problem 6 in R