before I change some variable names, should have fixed up loss rate now