correct term rate and iswithinrange calcs