Homework 2 for CSCI104