Add code and comments for Assignment 2