expand factor into dichotomous variables