added multivariate support