CS570 program 2