Selector logic added.