Final draft of program 2