added checking for numeric string