added hw2 source code