made the toggle work