R assignment 2 done