add wait time for previous instances to close