Final version of Homework 2