Final version of program