added validation for numeric input only