fixing level logic
annotating calculation