changes to R Programming Assignment 2