Homework 2 for CSCI 3308