wrote, but did not test, the loss rate computation code.