Assignment 3 for CS121