rprog assignment, week 2