remove global variable
add default digit count when not configured