implemented a basic counter for the levels