homework 3 for CSCI104