CS369 homework 1