more and fixed optimizations