Completed Solution to Assignment 2