This is the final version of the homework.