initial check in for assignment2
clean up comments for R functions