using Ruby to transform data