Added level logic.