adds documentation for the toggle() method