removed switch from computeDimension