final exercise for R Basic