assignment8 by wl1207