some tco optimizations