Corrected error in calculation of Y