Finished Version of program_1.  Needs testing.