an assortment of optimizations