CS171, Homework 7