add a toggle-class method