Solution to Assignment 3