corrected calculation mistakes