My Solution to Assignment 2