implemented level up/down logic