code for ass2