Updated and verified works on ruby 1.9