assignment 2 for rprog-006