some cpu optimizations