automatically generate expected changes from old and new state
simplify square root test