Program 2 for CS201