What about just having a function to return the current rate and then perform the calculation for total balance outside the function.  That would help solve the problem I mentioned in my other note too.