Added function to turn on and off an group