tests pass.  it's slow as shit, but tests pass