add r code answer in activity8