added ruby 2.x compatability