added numeric check for input