moved isDigit test to new file