iirc there was a condition in the code where it could go negative, so I added the checks to be pedantic.