cs3213 homework 2