added check for valid name if there is a digit in a name