data munging part2, 3 (ruby)