Prog 2 modified with comments