optimized some optimizations