changed judgement of levelval