Homework from Guowei Cai for Bios366