A more concise version of the preferredName function