modify to Ruby1.9 method