added R excercise 3