Implemented Programming Assignment 2