calculation of normal