updating toggles and query