re-introducing original dimension from the C++ version