Updated code Assignment 2

Second programming assignment