Changed the location of the 'toggle
' variable, since the initial placement required a second subdictionary, which was unnecessarily complicated.