minor optimizations