change dimlevel calculation