hw2 for udacity cs253.