more optimizations again