fix calculation and labeling