some micro-optimizations