bit of optimizations