force CpG and id to be factors