Programming Assignment 2 for Week3 implemented