automatically determine minimum parts of name to save