adding a level counter