slight optimizations