removed code for checking the value isNan and added tent validation for consistency and correct implementation