added jruby compability