add casts for isdigit