Update toggle() function
Merge pull request #2 from sonthanh/master

Update toggle() function