full toggle functionality