Internalized the toggle option function.