adding assign2 source code