CS171, Homework 2