better selector check