reordering handling of string values a bit