FInal Version for assignment2