cal optimizations