calculation works in simulation