Modified to run only one instance of the program.