Move Selector control function to maincontroller