Revert "optimizations"

This reverts commit a623abc16e83213666dfae7e6d4b061b81764adc.