Updated Program 8