       +  origin.localCoordinate(z3).squaredNorm
       +  2 * origin.localCoordinate(forwardMove).squaredNorm
   }
-  func createTrackingFactorGraph() -> (NewFactorGraph, VariableAssignments) {
+  func createTrackingFactorGraph() -> (FactorGraph, VariableAssignments) {
     var variables = VariableAssignments()
     let x1 = variables.store(origin)
     let x2 = variables.store(origin)
     let x3 = variables.store(origin)
     
-    var graph = NewFactorGraph()
-    graph.store(NewPriorFactor2(x1, z1)) // prior
-    graph.store(NewPriorFactor2(x1, z1))
-    graph.store(NewPriorFactor2(x2, z2))
-    graph.store(NewPriorFactor2(x3, z3))
-    graph.store(NewBetweenFactor2(x1, x2, forwardMove))
-    graph.store(NewBetweenFactor2(x2, x3, forwardMove))
+    var graph = FactorGraph()
+    graph.store(PriorFactor2(x1, z1)) // prior
+    graph.store(PriorFactor2(x1, z1))
+    graph.store(PriorFactor2(x2, z2))
+    graph.store(PriorFactor2(x3, z3))
+    graph.store(BetweenFactor2(x1, x2, forwardMove))
+    graph.store(BetweenFactor2(x2, x3, forwardMove))
     
     return (graph, variables)
+  }
+  
+  func printPoses(_ variables : VariableAssignments) {
+    print(variables[TypedID<Pose2, Int>(0)])
+    print(variables[TypedID<Pose2, Int>(1)])
+    print(variables[TypedID<Pose2, Int>(2)])
   }
   
   /// Tracking example from Figure 2.a
   func testTrackingExample() {
     // create a factor graph
     var (graph, variables) = createTrackingFactorGraph()
-    _ = graph as NewFactorGraph
+    _ = graph as FactorGraph
     
     // check number of factor types
     XCTAssertEqual(graph.storage.count, 2)

}

/// A between factor on `Pose2`.
public typealias NewSwitchingBetweenFactor2 = NewSwitchingBetweenFactor<Pose2, Array3<Tuple2<Vector3, Vector3>>>

/// A between factor on `Pose3`.
public typealias NewSwitchingBetweenFactor3 = NewSwitchingBetweenFactor<Pose3, Array6<Tuple2<Vector6, Vector6>>>

class Scratch: XCTestCase {
  let origin = Pose2(0,0,0)

/// A factor with a switchable motion model.
///
/// `JacobianRows` specifies the `Rows` parameter of the Jacobian of this factor. See the
/// documentation on `JacobianFactor.jacobian` for more information. Use the typealiases below to
/// avoid specifying this type parameter every time you create an instance.
public struct SwitchingBetweenFactor<Pose: LieGroup, JacobianRows: FixedSizeArray>:
  LinearizableFactor
where JacobianRows.Element == Tuple2<Pose.TangentVector, Pose.TangentVector>
{
  public typealias Variables = Tuple3<Pose, Int, Pose>
