handle multiple instances of the program