worked on ruby/max translation