Added code for derived dimensionality