Changed getDimensionName to local function