Final version of Assignment 2