Updated Program 1