prog3 with comments