updated handling of dummy variables