Optimized Calculate class