Assignment no. 2 for R class