some more optimizations