bit more optimizations