renamed dimLevel to dimlevel and add checks to assure that dimlevel is number