Add Assignment3 codes