minor optimizations for display