Assignment 2 for CSCI222 2013 spring