Final code for Assignment 2, rprog-008

Signed-off-by: masalman <ma.salman@gmail.com>