now supports switch_mode and next_mode triggers