atm_2.rb with variable denom