different formula

I've moved the variables outside the method, which was my mistake
yesterday.  I am now playing with different forms of the formula, which
appear to not be triggering an error; so I assume the formula is right
and I am not properly inserting the variables