assign2 code