added multidimension support