add killswitch logic