prog ass2 with comments