added basic toggle functionality