(I generally avoid temporary vars like this, but here it clarifies the semantics of a slightly confusing operation)