debugging invariant mass code, should work