minor optimization for name writing