added some button functionality: delay on/off and kill switch