added testing and better killswitch