made compatible with 1.9.2 ruby