only add factor if factor is applied to the selected samples