Corrected toggle fucntion
Merge pull request #30 from cme3888/master

Corrected toggle fucntion