update to work under jruby too