Updated Program 4