Add Assignment2 codes