Add level-max and level-min
Use value of level-max and level-min