closure optimizations