data munging (ruby)