Assignment 4 for UMass CS 473