assignment3 from Fangyun Sun