r programming assignment 2 - version 1