two micro-optimizations