assignment6 from Fangyun Sun