got threading working along with a kill switch