Updated Program 3