Updated Chapter 3 program 1