add fxn that should terminate instances when needed