improved calculation
corrected