Update assignment2.R