Calculations optimization