Add toggle function.