Assignment 3 for CS 221