mke the code compatible to Ruby 1.8