more apparently very safe optimizations