some micro optimizations