maxLevel implementation