assignment9 from Fangyun Sun