You didn’t show us the math, so that makes it harder. At a guess, you tried to subtract states. Or perhaps ‘state as Number’ - that will mess up too, because your states are Quantities, with units.