use of isNaN to guard against non numeric entries