Section 3--106. Sum Certain. (1) The sum payable is a sum certain even though it is to be paid (a) with a stated rate of interest or by stated installments; or (b) with  stated  different  rates  of  interest before and after default or a specified date; or (c) with a stated discount or addition if paid  before  or  after the date fixed for payment; or (d) with exchange or less exchange, whether at a fixed rate or at the current rate; or (e) with  costs  of  collection or an attorney's fee or both upon default. (2) For the purposes of subsection one of this section "a stated  rate  of  interest"  shall  also  include  a  rate  of interest that cannot be  calculated by looking only  to  the  instrument  but  which  is  readily  ascertainable  by  a reference in the instrument to a published statute,  regulation, rule of court, generally accepted  commercial  or  financial  index,  compendium  of  interest  rates,  or  announced  rate of a named  financial institution. (3) Nothing in this section shall validate any term which is otherwise  illegal.