Updated Program 2