checks for selection