new update added isNan function