renaming a few things, fixing a little math to account for the zero