some threading optimizations