improve selected checking