added isNaN to recognize strings inputed