Added scaling in the formula for generating a level