add a switch to turn off sidebar