added rescue since jruby throws exception rather than returning nil