modified the application so that it will only allow one instance to be run at a time