2nd assignment for R programming