implement emergency stop topic and set mode