templatize dimension