I think the isNaN tests are not necessary anymore?