better handling of categorical variables in simulateData()