final version of CS169.2x Homework 1