refining language_selector functions and connections