calculate delta in apply_actions